<script>
$(function() {
	$( "#tabs" ).tabs({
	    select: function(event, ui) {
	        var url = $.data(ui.tab, 'load.tabs');
	        if( url ) {
	            location.href = url;
	            return false;
	        }
	        return true;
	    },
	selected: 0
	});
});
</script>
<div id="tabs">
	<ul>
            <li><a href='#pt'>Khen thưởng - kỷ luật</a> </li>
           <li><?php echo $this->Html->link(__('Thêm mới', true), array('controller'=>'khenthuongkyluats','action' => 'add',$khoa_id)); ?></li>
    </ul>
<div class="khenthuongkyluats index">
	<h2 style="text-align: center"><?php __('Danh sách Khen thưởng - Kỷ luật');?></h2>
    	<p>
	<?php
	echo $this->Paginator->counter(array(
	'format' => __('Trang %page%/%pages%, hiện có %count% mẫu tin', true)
	));
	?>	</p>
	<table cellpadding="0" cellspacing="0" id="tables">
	<tr>
			<th><?php echo 'STT';?></th>
			<th><?php echo 'Loại'?></th>
			<th><?php echo 'Cấp';?></th>
			<!--<th><?php //echo $this->Paginator->sort('khoa_id');?></th>-->
			<th><?php echo 'Hình Thức';?></th>
			<th><?php echo 'Người Nhận';?></th>
			<th><?php echo 'Lý do';?></th>
			<th><?php echo 'Ghi chú';?></th>
			<th class="actions"><?php __('Thao Tác');?></th>
	</tr>
	<?php
	$i = 0;
	foreach ($khenthuongkyluats as $khenthuongkyluat):
		$class = null;
		if ($i++ % 2 == 0) {
			$class = ' class="altrow"';
		}
	?>
	<tr<?php echo $class;?>>
		<td><?php echo $khenthuongkyluat['Khenthuongkyluat']['id']; ?>&nbsp;</td>
		<td>
			<?php echo $khenthuongkyluat['Loai']['tenloai']; ?>
		</td>
		<td>
			<?php echo $khenthuongkyluat['Cap']['tencap']; ?>
		</td>
		<!--<td>
			<?php //echo $this->Html->link($khenthuongkyluat['Khoa']['id'], array('controller' => 'khoas', 'action' => 'view', $khenthuongkyluat['Khoa']['id'])); ?>
		</td>-->
		<td>
			<?php echo $khenthuongkyluat['Hinhthuc']['tenhinhthuc'];?>
		</td>
		<td><?php echo $khenthuongkyluat['Khenthuongkyluat']['nguoinhan']; ?>&nbsp;</td>
		<td><?php echo $khenthuongkyluat['Khenthuongkyluat']['lydo']; ?>&nbsp;</td>
		<td><?php echo $khenthuongkyluat['Khenthuongkyluat']['ghichu']; ?>&nbsp;</td>
		<td class="actions">
			<?php echo $this->Html->link(__('Sửa', true), array('action' => 'edit',$khoa_id, $khenthuongkyluat['Khenthuongkyluat']['id'])); ?>
			<?php echo $this->Html->link(__('Xóa', true), array('action' => 'delete',$khoa_id, $khenthuongkyluat['Khenthuongkyluat']['id']), null, sprintf(__('Bạn muốn xóa quyết định khen thưởng(kỷ luật) của  %s?', true), $khenthuongkyluat['Khenthuongkyluat']['nguoinhan'])); ?>
		</td>
	</tr>
<?php endforeach; ?>
	</table>
	<div class="paging">
		<?php echo $this->Paginator->prev('<< ' . __('Trước', true), array(), null, array('class'=>'disabled'));?>
	 | 	<?php echo $this->Paginator->numbers();?>
 |
		<?php echo $this->Paginator->next(__('Sau', true) . ' >>', array(), null, array('class' => 'disabled'));?>
	</div>
</div>